package org.ecpkn.PAGridSim.core.tasksCreation;


public class SimpleTaskCreator extends PeriodTaskCreator {
	private static final class Const {

		private static final Integer[] executionTimeList=new Integer[]{1,7,3,7,9,9,6,1,5,7,10,13,20,13,23};
		private static final Integer[] periodList=new Integer[]{6,25,33,30,35,75,55,47,51,80,20,30,30,40,33};

	}

	@Override
	protected double defineTaskPeriod(int taskNumber) {

		return Const.periodList[taskNumber];
	}

	@Override
	protected double defineTaskLength(int taskNumber) {
		
		double length = Const.executionTimeList[taskNumber];
		taskLength.add(taskNumber, length);
		return length;
	}

	@Override
	protected double defineTaskArrivingTime(int taskNumber) throws Exception {
		return 0;
	}

	@Override
	protected int defineTaskRepeatNumber(int taskNumber) {
		return 2;
	}

	@Override
	protected int defineTaskSetSize() {

		return 15;
	}

	@Override
	protected double reDefinePeriod(int TaskNumber) {
		return Const.periodList[TaskNumber];
	}
}
